<?php

class ActivityAction extends BaseAction
{

    public function index()
    {
//        Load('extend');
//        import('ORG.Net.IpLocation');
//        $ip = new Iplocation(); //新建一个IP查询对象
//        $location = $ip->getlocation(); //

        $id = intval($_GET['id']);
        $Activity = D("Activity")->getById($id);

        $cate = D("Categroy")->getById($Activity['cateId']);
        if ($Activity['parameters']) {
            $parameters = explode('<br />', $Activity['parameters']);
            $this->assign("par", $parameters); //使用volist标签 name="parameters"时不能正常输出
        }
        $condition->id = $Activity['regionId'];
//        $region = D("Region")->where($condition)->first();
//        var_dump($region);exit;
//        $this->assign("region", $region);
        $this->assign("cate",$cate);
        $this->assign($Activity);
        $this->display();
    }


}

?>